﻿@model System.Collections.Generic.SortedList<string, System.Collections.Generic.List<GameSchoolApplication.Models.ViewModels.assWithGrade>>
<h2>Skiluð Verkefni</h2>
@foreach (var u in Model)
{
    <div class="coursetable">@u.Key</div>
    <table border="1" width="500px">
        <thead>
            <th>
                Verkefni
            </th>
            <th>
                Einkunn
            </th>
            <th>
                Staða
            </th>
        </thead>
        <tbody>
            @foreach (var l in u.Value)
            {

                if (l.grade < 0)
                { 
                <tr>
                    <td>@l.ass.name
                    </td>
                    <td>
                        ekkert
                    </td>
                    <td>
                        enginn
                    </td>
                </tr>              
                }
                else
                {                  
                <tr>
                    <td>@l.ass.name
                    </td>
                    <td>@l.grade
                    </td>
                    <td>
                        @if (l.grade > 4.4)
                        {
                            <span>Staðist</span>   
                        }
                        else
                        {
                            <span>Fall</span>   
                        }
                    </td>
                </tr>      
                

                }
            }
        </tbody>
    </table>
        
}
